package org.tea.inventory.enums;

import lombok.Getter;
import lombok.Setter;

import java.util.Objects;

/**
 * @author hanzy
 * @description 培训审批节点状态
 * @date 2023年04月06日 14:03
 */
public enum TrainStatusEnum {
    Ops_running("20", "运营审核中"),
    Ops_reject("21", "运营驳回"),
    Final_running("30", "总裁室审核中"),
    Final_reject("31", "总裁室驳回"),
    pass("40", "总裁室通过"),
    ;

    @Getter
    @Setter
    private String code;
    @Getter
    @Setter
    private String content;

    TrainStatusEnum(String code, String content) {
        this.code = code;
        this.content = content;
    }

    public static String getContentByName(String code) {
        for (TrainStatusEnum productAttributeEnum : TrainStatusEnum.values()) {
            if (Objects.equals(productAttributeEnum.getCode(), code)) {
                return productAttributeEnum.getContent();
            }
        }
        return "";
    }
}
